// 量子纠缠页面样式
.quantum-entanglement {
  height: calc(100vh - 200px);
  min-height: 700px;
  box-sizing: border-box;
  overflow: hidden;
  overflow-y: auto;
  padding: 24px;
  background: radial-gradient(ellipse at center, rgba(0, 20, 40, 0.05) 0%, rgba(0, 0, 20, 0.02) 100%);
  
  .quantum-header {
    text-align: center;
    margin-bottom: 32px;
    
    .ant-typography h1 {
      background: linear-gradient(135deg, #722ed1 0%, #13c2c2 50%, #1890ff 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-shadow: 0 4px 8px rgba(114, 46, 209, 0.3);
      animation: quantumGlow 3s ease-in-out infinite alternate;
    }
  }

  // 量子控制面板
  .quantum-control-panel {
    height: fit-content;
    position: sticky;
    top: 24px;
    background: linear-gradient(135deg, rgba(114, 46, 209, 0.1) 0%, rgba(19, 194, 194, 0.1) 100%);
    border: 1px solid rgba(114, 46, 209, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(114, 46, 209, 0.15);
    
    .ant-card-head {
      background: linear-gradient(135deg, rgba(114, 46, 209, 0.2) 0%, rgba(19, 194, 194, 0.2) 100%);
      border-bottom: 1px solid rgba(114, 46, 209, 0.2);
      border-radius: 16px 16px 0 0;
      
      .ant-card-head-title {
        color: #722ed1;
        font-weight: 600;
        text-shadow: 0 2px 4px rgba(114, 46, 209, 0.3);
      }
    }

    .current-quantum-effect {
      text-align: center;
      padding: 20px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 245, 255, 0.8) 100%);
      border-radius: 12px;
      border: 1px solid rgba(114, 46, 209, 0.1);
      
      .effect-icon {
        margin-bottom: 12px;
        
        span {
          display: inline-block;
          padding: 16px;
          border-radius: 50%;
          background: linear-gradient(135deg, #722ed1 0%, #13c2c2 100%);
          color: white;
          box-shadow: 0 8px 20px rgba(114, 46, 209, 0.3);
          animation: quantumPulse 2s ease-in-out infinite;
        }
      }
    }

    .quantum-controls {
      .control-item {
        margin-bottom: 20px;
        
        .ant-slider {
          margin-top: 8px;
          
          .ant-slider-rail {
            background: rgba(114, 46, 209, 0.1);
          }
          
          .ant-slider-track {
            background: linear-gradient(90deg, #722ed1 0%, #13c2c2 100%);
          }
          
          .ant-slider-handle {
            border-color: #722ed1;
            box-shadow: 0 0 0 2px rgba(114, 46, 209, 0.2);
            
            &:hover, &:focus {
              border-color: #13c2c2;
              box-shadow: 0 0 0 5px rgba(19, 194, 194, 0.2);
            }
          }
        }

        .ant-select {
          .ant-select-selector {
            border-color: rgba(114, 46, 209, 0.3);
            
            &:hover {
              border-color: #722ed1;
            }
          }
          
          &.ant-select-focused .ant-select-selector {
            border-color: #13c2c2;
            box-shadow: 0 0 0 2px rgba(19, 194, 194, 0.2);
          }
        }

        .ant-switch {
          &.ant-switch-checked {
            background: linear-gradient(90deg, #722ed1 0%, #13c2c2 100%);
          }
        }
      }
    }

    .physics-principle,
    .quantum-features {
      padding: 16px;
      background: rgba(255, 255, 255, 0.6);
      border-radius: 8px;
      border: 1px solid rgba(114, 46, 209, 0.1);
      
      ul {
        margin: 8px 0 0 0;
        padding-left: 16px;
        
        li {
          margin-bottom: 6px;
          color: #722ed1;
          
          &::marker {
            color: #13c2c2;
          }
        }
      }
    }

    .quantum-status {
      padding: 16px;
      background: linear-gradient(135deg, rgba(114, 46, 209, 0.05) 0%, rgba(19, 194, 194, 0.05) 100%);
      border-radius: 8px;
      border: 1px solid rgba(114, 46, 209, 0.1);
      
      .status-item {
        display: flex;
        align-items: center;
        margin-bottom: 8px;
        
        .status-indicator {
          margin: 0 8px;
          font-size: 12px;
          
          &.coherent {
            color: #52c41a;
            animation: quantumBlink 1.5s ease-in-out infinite;
          }
          
          &.entangled {
            color: #722ed1;
            animation: quantumBlink 2s ease-in-out infinite;
          }
          
          &.active {
            color: #13c2c2;
            animation: quantumBlink 1s ease-in-out infinite;
          }
          
          &.inactive {
            color: #d9d9d9;
          }
        }
      }
    }
  }

  // 量子效果展示区域
  .quantum-display-area {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 245, 255, 0.9) 100%);
    border: 1px solid rgba(114, 46, 209, 0.2);
    border-radius: 16px;
    min-height: 650px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(114, 46, 209, 0.1);
    
    .ant-card-body {
      padding: 0;
      height: 650px;
    }
    
    .ant-tabs {
      height: 100%;
      
      .ant-tabs-nav {
        background: linear-gradient(135deg, rgba(114, 46, 209, 0.1) 0%, rgba(19, 194, 194, 0.1) 100%);
        margin: 0;
        padding: 0 24px;
        border-bottom: 1px solid rgba(114, 46, 209, 0.2);
        border-radius: 16px 16px 0 0;
        
        .ant-tabs-tab {
          border: none;
          background: transparent;
          
          &.ant-tabs-tab-active {
            background: linear-gradient(135deg, rgba(114, 46, 209, 0.2) 0%, rgba(19, 194, 194, 0.2) 100%);
            border-radius: 12px 12px 0 0;
            
            .ant-tabs-tab-btn {
              color: #722ed1;
              font-weight: 600;
              text-shadow: 0 1px 2px rgba(114, 46, 209, 0.3);
            }
          }
          
          &:hover {
            background: rgba(114, 46, 209, 0.1);
            border-radius: 12px 12px 0 0;
          }
        }
        
        .ant-tabs-extra-content {
          .ant-btn {
            color: #722ed1;
            border-color: rgba(114, 46, 209, 0.3);
            
            &:hover {
              background: rgba(114, 46, 209, 0.1);
              color: #13c2c2;
              border-color: #13c2c2;
            }
          }
        }
      }
      
      .ant-tabs-content-holder {
        height: calc(100% - 56px);
        
        .ant-tabs-content {
          height: 100%;
          
          .ant-tabs-tabpane {
            height: 100%;
            padding: 0;
          }
        }
      }
    }
  }

  // 全局按钮样式
  .ant-btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    
    &.ant-btn-primary {
      background: linear-gradient(135deg, #722ed1 0%, #13c2c2 100%);
      border: none;
      box-shadow: 0 4px 12px rgba(114, 46, 209, 0.3);
      
      &:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(114, 46, 209, 0.4);
      }
    }
    
    &.ant-btn-default {
      border-color: #722ed1;
      color: #722ed1;
      
      &:hover {
        background: linear-gradient(135deg, rgba(114, 46, 209, 0.1) 0%, rgba(19, 194, 194, 0.1) 100%);
        border-color: #13c2c2;
        color: #13c2c2;
        transform: translateY(-1px);
      }
    }
  }

  // 知识卡片样式
  .ant-card {
    border-radius: 12px;
    border-color: rgba(114, 46, 209, 0.2);
    
    &.ant-card-small {
      .ant-card-head {
        background: linear-gradient(135deg, rgba(114, 46, 209, 0.05) 0%, rgba(19, 194, 194, 0.05) 100%);
        
        .ant-card-head-title {
          color: #722ed1;
          font-size: 14px;
        }
      }
      
      .ant-card-body {
        background: rgba(255, 255, 255, 0.8);
      }
    }
  }

  // 滚动条样式
  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-track {
    background: rgba(114, 46, 209, 0.1);
    border-radius: 4px;
  }

  &::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #722ed1 0%, #13c2c2 100%);
    border-radius: 4px;
    
    &:hover {
      background: linear-gradient(135deg, #9254de 0%, #36cfc9 100%);
    }
  }
}

// 量子动画效果
@keyframes quantumGlow {
  0%, 100% {
    text-shadow: 0 4px 8px rgba(114, 46, 209, 0.3);
  }
  50% {
    text-shadow: 0 4px 20px rgba(19, 194, 194, 0.5);
  }
}

@keyframes quantumPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(114, 46, 209, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(19, 194, 194, 0.4);
  }
}

@keyframes quantumBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

// 响应式设计
@media (max-width: 1200px) {
  .quantum-entanglement {
    .quantum-control-panel {
      position: static;
      margin-bottom: 24px;
    }
  }
}

@media (max-width: 768px) {
  .quantum-entanglement {
    padding: 16px;
    
    .quantum-header {
      margin-bottom: 24px;
      
      .ant-space {
        flex-direction: column;
        
        span {
          font-size: 36px !important;
        }
      }
    }
    
    .quantum-display-area {
      min-height: 450px;
      
      .ant-card-body {
        height: 450px;
      }
      
      .ant-tabs {
        .ant-tabs-nav {
          padding: 0 12px;
          
          .ant-tabs-tab {
            padding: 8px 12px;
            font-size: 12px;
          }
        }
        
        .ant-tabs-content-holder {
          height: calc(100% - 48px);
        }
      }
    }
    
    .quantum-control-panel {
      .current-quantum-effect {
        padding: 16px;
        
        .effect-icon span {
          font-size: 24px;
          padding: 12px;
        }
      }
    }
  }
}

@media (max-width: 480px) {
  .quantum-entanglement {
    padding: 12px;
    
    .quantum-display-area {
      min-height: 350px;
      
      .ant-card-body {
        height: 350px;
      }
    }
    
    .ant-tabs {
      .ant-tabs-nav {
        .ant-tabs-tab {
          padding: 6px 8px;
          
          .ant-space {
            gap: 4px !important;
          }
        }
        
        .ant-tabs-extra-content {
          display: none;
        }
      }
    }
  }
}

// 性能优化
@media (prefers-reduced-motion: reduce) {
  .quantum-entanglement {
    .quantum-header .ant-typography h1 {
      animation: none;
    }
    
    .current-quantum-effect .effect-icon span {
      animation: none;
    }
    
    .status-indicator {
      animation: none !important;
    }
  }
}
